﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.MountAndBlade.RecentPlayersFriendListService
// Assembly: TaleWorlds.MountAndBlade, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: D5209D1B-76B5-47CA-B957-255CD4B2CE6B
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.dll

using System.Collections.Generic;
using TaleWorlds.Localization;
using TaleWorlds.MountAndBlade.Diamond;
using TaleWorlds.PlatformService;
using TaleWorlds.PlayerServices;

#nullable disable
namespace TaleWorlds.MountAndBlade
{
  public class RecentPlayersFriendListService : BannerlordFriendListService, IFriendListService
  {
    bool IFriendListService.IncludeInAllFriends => false;

    bool IFriendListService.CanInvitePlayersToPlatformSession
    {
      get => PlatformServices.InvitationServices != null;
    }

    TextObject IFriendListService.GetServiceLocalizedName()
    {
      return new TextObject("{=XvSRoOzM}Recently Played Players");
    }

    string IFriendListService.GetServiceCodeName() => "RecentlyPlayedPlayers";

    IEnumerable<PlayerId> IFriendListService.GetAllFriends()
    {
      return RecentPlayersManager.GetPlayersOrdered();
    }

    FriendListServiceType IFriendListService.GetFriendListServiceType()
    {
      return FriendListServiceType.RecentPlayers;
    }
  }
}
